package com.kaibes.core.base.builder;

public class SeparatorBuilder {

    private java.lang.StringBuilder sb = new java.lang.StringBuilder();
    private String separator;
    
    public SeparatorBuilder(String separator) {
        this.separator = separator;
    }
    
    public SeparatorBuilder appends(String str) {
        sb.append(str).append(separator);
        return this;
    }
    
    public SeparatorBuilder append(String str) {
        sb.append(str);
        return this;
    }
    
    public SeparatorBuilder delEnd() {
        if (sb.length() > 0) {
            sb.deleteCharAt(sb.length()-1);
        }
        return this;
    }
    
    @Override
    public String toString() {
        return sb.toString();
    }
}
